========================================
=                                      =
=    The Beagle Compiler Jump Table    =
=                                      =
=    Typed by : (*-Practor Fime-*)     =
=                                      =
========================================

Programmers have always had a desire to
modify the Applesoft interpreter to add
more power and efficiency to the somewh-
at stale language. Since the interpreter
is in ROM, it is a bit difficult to 
patch. The Beagle Compiler's interpreter
however, is in RAM, and you can change
statements and functions at will. The 
Jump table goes from $9900 to $99FF and
contains vectors (addresses) to each
 part of the Compiler that processes
statements and functions. A few well-
placed pokes from BASIC or machine 
language will "steer" commands to any
area of memory you choose.

For example, the following program, when
compiled will make HOME act like HGR.
From there you're on your own.

10 POKE 39208,PEEK(39282): REM $9928,
   $9972
20 POKE 39209,PEEK(39283): REM $9929,
   $9973
21 : REM $9928-29 IS THE ADDRESS FOR 
   HOME
22 : REM $9972-73 IS THE ADDRESS FOR
   HGR
30 HOME : REM HOME NOW WORKS LIKE HGR
40 HCOLOR=3: HPLOT 0,0 TO 279,191


Now for the Jump Table!


****************************************

The Jump Table will be put in the format
of Address, Name and then Function

****************************************

$9900 : init : Initialize and run the
        the program
========================================
$9902 : run : RUN line number
========================================
$9904 : clear : CLEAR
====================================
$9906 : restore : RESTORE
========================================
$9908 : on : ON GOTO/GOSUB
========================================
$990A : goto : GOTO
========================================
$990C : gosub : GOSUB
========================================
$990E : return : RETURN
========================================
$9910 : pop : POP
========================================
$9912 : end : END (halts program)
========================================
$9914 : let : assign value to simple
        numeric value
========================================
$9916 : for : FOR (set TO value and 
        initialize loop)
========================================
$9918 : step : STEP
========================================
$9920 : tab : TAB
========================================
$9922 : comma : comma function in PRINT
        statement
========================================
$9924 : crout : print a RETURN
========================================
$9926 : text : TEXT
========================================
$9928 : home : HOME
========================================
$992A : normal : NORMAL
========================================
$992C : inverse; : INVERSE
========================================
$992E : flash : FLASH
========================================
$9930 : next : NEXT
========================================
$9932 : nextvar : NEXT statement with
        a variable
========================================
$9934 : letstr : assign value to simple
        string variable
========================================
$9936 : onerr : ONERR GOTO
========================================
$9938 : prnum : PR#
========================================
$993A : innum : IN#
========================================
$993C : readn : READ a numeric value
========================================
$993E : reads : READ a string value
========================================
$9940 : getn : GET a numeric value
        (shouldn't be used)
========================================
$9942 : gets : GET a string value
========================================
$9944 : plot : PLOT
========================================
$9946 : vlin : VLIN
========================================
$9948 : hlin : HLIN
========================================
$994A : if : IF
=========================================
$994C : inputn : INPUT a numeric value
========================================
$994E : inputs : INPUT a string value
========================================
$9950 : prtqm : print a "?"
========================================
$9952 : gr : GR
========================================
$9954 : draw : DRAW
========================================
$9956 : drawat : DRAW with an AT
========================================
$9958 : xdraw : XDRAW
========================================
$995A : xdrawat : XDRAW with an AT
========================================
$995C : hplot : HPLOT
========================================
$995E : hplotto : HPLOT TO
========================================
$9960 : stop : STOP
========================================
$9962 : hcolor : HCOLOR
========================================
$9964 : htab : HTAB
========================================
$9966 : vtab : VTAB
========================================
$9968 : color : COLOR
========================================
$996A : speed : SPEED=
========================================
$996C : poke : POKE
========================================
$996E : call : CALL
========================================
$9970 : hgr2 : HGR2
========================================
$9972 : hgr : HGR
========================================
$9974 : scale : SCALE=
========================================
$9976 : rot : ROT=
========================================
$9978 : usr : USR
========================================
$997A : pdl : PDL
========================================
$997C : peek : PEEK
========================================
$997E : letint : assign value to simple
        integer variable
========================================
$9980 : letary : assign value to array
========================================
$9982 : letstrary : assign value to 
        string array
========================================
$9984 : dim : DIM
========================================
$9986 : himem : HIMEM
========================================
$9988 : lomem : LOMEM
========================================
$998A : resume : RESUME
========================================
$998C : ampersand : & (use 2 of them)
========================================
$998E : wait2 : WAIT with 2 parameters
========================================
$9990 : wait3 : WAIT with 3 parameters
========================================
$9992 : def : DEF FN
========================================
$9994 : byte : byte numeric constant
========================================
$9996 : integer : integer numeric 
        constant
========================================
$9998 : fp : floating point constant
        (packed)
========================================
$999A : literal : string constant
========================================
$999C : getnvar : get value of numeric
        variable
========================================
$999E : getsvar : get value of string
        variable
========================================
$99A0 : or : OR
========================================
$99A2 : and : AND
========================================
$99A4 : relop : relational operator 
        determined by the next byte:
        0:<,3:<=6:=,9:<>,12:>=,15:>
========================================
$99A6 : strcomp : string relational
        operator (see above)
========================================
$99A8 : add : + (addition)
========================================
$99AA : minus : - (subtraction)
========================================
$99AC : times : * (multiplication)
========================================
$99AE : div : / (division)
========================================
$99B0 : power : ^ (exponentiation)
========================================
$99B2 : not : NOT
========================================
$99B4 : asc : ASC
========================================
$99B6 : chr : CHR$
========================================
$99B8 : pos : POS
========================================
$99BA : len : LEN
========================================
$99BC : left : LEFT$
========================================
$99BE : right : RIGHT$
========================================
$99C0 : mid2 : MID$ with 2 parameters
========================================
$99C2 : mid3 : MID$ with 3 parameters
========================================
$99C4 : str : STR$
========================================
$99C6 : abs : ABS
========================================
$99C8 : rnd : RND
========================================
$99CA : sgn : SGN
========================================
$99CC : int : INT
========================================
$99CE : val : VAL
========================================
$99D0 : neg : negate
========================================
$99D2 : concat : + (string concatenation)
========================================
$99D4 : scrn : SCRN
========================================
$99D6 : fre : FRE
========================================
$99D8 : sqr : SQR
========================================
$99DA : log : LOG
========================================
$99DC : exp : EXP
========================================
$99DE : cos : COS
========================================
$99E0 : sin : SIN
========================================
$99E2 : tan : TAN
========================================
$99E4 : atn : ATN
========================================
$99E6 : getnary : get value of numeric
        array
========================================
$99E8 : getsary : get value of string
        array
========================================
$99EA : fn : FN (user-defined function)
========================================
$99EC : savres : save code pointer if
        RESUME exists (before each
        statement that can generate an
        error)
========================================
$99EE : error : process an error
========================================
$99F0 : input : prepare for a numeric
        or string input
========================================

And finally some user available routines

****************************************
The same format will be used!
****************************************


$99E8 : MOVSTR 
Moves a string (no length byte, must end
with 0 byte) to string space which has
already been allocated with "GETSPA."
On entry, A=LSB of string address X=MSB
of string address
========================================
$98EB : BYTE
Evaluates a numeric parameter and 
verifies that it is a byte value (0-255)
Anything else gives ILLEGAL QUANTITY.
The value is returned in both A and X.
========================================
$98EE : PRTNUM
Prints a numeric value. Set the carry
flag if the value is floating point
(in the FAC). IF the value is integer,
clear the carry flag and te value 
should be in X (LSB) and A (MSB).
========================================
$98F1 : ERROR
Calls ERROR to report an error. X should
contain the number of the error message
(see Apple BASIC Reference Manual). If
ONERR is not enabled, the program will
stop and print the error message.
========================================
$98F4 : GETSPA
Allocates space in the string area.
A=length of the string. One addional
byte is allocated because the first
byte contains the length of the string.
Put the string where $F6,$F7 points.
========================================
$98F7 : PRTSTR 
Prints the string pointed to $F6,$F7.
========================================
$98FA : PROC 
Processes the next statement. A jump to
this location is done at the end of 
every BASIC statement. If you are 
replacing a statement, your code should
end with this.
========================================
$98FD : EVAL
Evaluates a numeric string parameter.
========================================

One last section....VARIABLES


****************************************

Variables are indicated by a byte value
($00-FF). The values for the variables
are accessed by using the byte value
as an index into the tables at the 
addresses indicated by the following
pointers:

vtype   ($78):    Variable type
                  bit7=1 if array,0 if not
                  bit6=1 if string,0 if numeric
                  bit5=1 if FN (user-defined function)
                  bit4=1 if integer
                  bits0-3= # of dimensions in array

The following information depends upon
the type of variable involved.
FP = floating point
LSB = least significant byte
MSB = most sinificant byte


vval1   ($7A):     Array:LSB of address of array header
                   String:LSB of address of string
                   FP:non-zero value indicates this is floating
                      point type. 1st byte of packed FP value.
                   Integer:This value is zero if variable has an
                      ineger value

vval2   ($7C):     Array:MSB of address of array header
                   String:MSB of address string
                   FP:2nd byte of FP value
                   Integer:LSB of integer value

vval3   ($7E):     Array:LSB of address array
                   FP:3rd byte of FP value
                   Integer:MSB byte of integer value

vval4   ($80)      Array:MSB of address array
                   FP:4th byte of FP value

vval5   ($82)      Array:Number of dimensions, 0 if not dimensioned yet
                   FP:5th byte of FP value


If variable A$ has a variable index of
2, then the following code would assign
A$ the string pointed at by PTR:

LDY   #2            ;variable A$
LDY   PTR
STA   ($7A),Y       ;store LSB of address
LDA   PTR+1
STA   ($7C),Y       ;store MSB of address



Guess what? the dox to BC are finally finished!!!
I would like to thank BlackBeard and
The Appler for making the release of
this ware possible.


$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ARE YOU ELITE ENOUGH TO CALL THESE?? $
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
The Courtroom Elite.....213-644-2760
Dark Cosmos Elite.......213-476-7678
Alpha Centauri..........213-838-7726
MotherBoard West........415-994-2758
Zero Infinity...........415-665-9243
The Haven...............416-485-7805
Smash*Palace*South......512-441-0095
Trans-fus ][............514-738-1247
Black Forest............617-263-9413